package com.ship.enume;

public enum UserType implements IWenumType {
	
	admin{
		public String getText(){
			return "管理员";
		}
		public int getValue(){
			return 0;
		}
	},
	update{
		public String getText(){
			return "可修改";
		}
		public int getValue(){
			return 1;
		}
	},
	select{
		public String getText(){
			return "仅查看";
		}
		public int getValue(){
			return 2;
		}
	};
	
		
	public String getName() {
		return this.name();
	}

	public int getValue(){
		return this.ordinal();
	}
	
	public int getIndex() {  
		return ordinal() + 1;  
	} 
	
	public Object getEnumByName(String name){
		return UserType.valueOf(name);
	}
}
